cmake_minimum_required(VERSION 3.8)
project(src_prop_get)

#define_property(SOURCE PROPERTY my_src_prop BRIEF_DOCS "src docs" FULL_DOCS "src full doc")
#set_property(SOURCE main.c PROPERTY my_src_prop "my_src_prop value")
set_source_files_properties(main.c PROPERTIES my_src_prop "this is value")

get_property(var1 SOURCE main.c PROPERTY my_src_prop DEFINED)
message(STATUS "my_src_prop is defined? = ${var1}")
get_property(var2 SOURCE main.c PROPERTY my_src_prop SET)
message(STATUS "my_src_prop is set? = ${var2}")
get_property(var3 SOURCE main.c PROPERTY my_src_prop BRIEF_DOCS)
message(STATUS "my_src_prop is brief docs? = ${var3}")
get_property(var4 SOURCE main.c PROPERTY my_src_prop FULL_DOCS)
message(STATUS "my_src_prop is full docs? = ${var4}")
get_property(var5 SOURCE main.c PROPERTY my_src_prop)
message(STATUS "my_src_prop = ${var5}")

get_source_file_property(var6 main.c my_src_prop)
message(STATUS "my_src_prop = ${var6}")
